<?php
//$p = Yii::app()->parameter->getParametersArray('RPTTYP');

//$p = $p->toAssociativeArray();
foreach ($reports as $type => $arr) {
	echo "<h2>$type</h2><ul>";
	foreach ($arr as $report) {
		$url = Yii::app()->createUrl('/reporting/default/render', array (
			'id' => $report->id
		));
		echo "<li><strong><a href='$url'>" . $report->report->title . "</a></strong> " . Yii::t("views", "edited on") . " " . Constants::fromSqlDateTime($report->edition_date) . "</li>";
	}
	echo "</ul>";
}
	
	if (ProjectHelper::canEditProject($project))
	{
		$url = Yii::app()->createUrl('/reporting/report/create', array (
			'project_id' => $this->project->id
		));
		echo "<a href='$url' class='new_document'>Nouveau document</a>";
	}
?>
